package singleton;

//懒汉式
public class Singleton {
    private Singleton() {
    }

    private static class Instance {
        private static final Singleton INSTANCE = new Singleton();
    }

    public static Singleton getInstance() {
        return Instance.INSTANCE;
    }

    String name;
}
